package com.example.demo.service.impl;

import com.example.demo.mapper.StudentMapper;
import com.example.demo.pojo.Student;
import com.example.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;


    @Override
    public List<Student> getStudentById(Integer id) {
        return studentMapper.selectByCidStep2(id);
    }

    @Override
    public List<Student> selectStudentWithClass() {
        return studentMapper.selectStudentWithClass();
    }

    @Override
    public Student selectById(Integer id) {
        return studentMapper.selectById(id);
    }
}
